package com.dmap.admin.vo.backgroundv2;

import com.dmap.admin.po.User;
import com.dmap.base.pojo.BasePojo;

/**
 * \* User: helei
 * \* Date: 08/05/18
 * \* Description:
 * \
 */
public class LoginVo extends BasePojo {
    private String userId;//用户id
    private String account;//用户账号
    private String companyId;
    private String companyName;//所在公司名称
    private Integer companyType;//公司类型：1.总公司， 2分公司
    private String departmentId;
    private String departmentName;
    private String headImageUrl;//用户头像url
    private Integer loginWrongNum;//登陆错误数
    private Integer userType;//用户类型：1.公司管理员，2.部门管理员，3.普通用户

    private String ip;//ip地址
    private String address;//地址
    private Long thisLoginTime;//本次登陆时间
    private Long lastLoginTime;//上次登陆时间

    public LoginVo(User user) {
        this.userId = user.getId().toString();
        this.account = user.getAccount();
        this.companyId = user.getCompanyId().toString();
        this.companyName = user.getCompanyName();
        this.companyType= user.getCompanyType();
        this.departmentId = user.getDepartmentId().toString();
        this.departmentName = user.getDepartmentName();
        this.headImageUrl = user.getHeadImageUrl();
        this.loginWrongNum = user.getLoginWrongNum();
        this.userType = user.getUserType();
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getHeadImageUrl() {
        return headImageUrl;
    }

    public void setHeadImageUrl(String headImageUrl) {
        this.headImageUrl = headImageUrl;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Long getThisLoginTime() {
        return thisLoginTime;
    }

    public void setThisLoginTime(Long thisLoginTime) {
        this.thisLoginTime = thisLoginTime;
    }

    public Long getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Long lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public Integer getLoginWrongNum() {
        return loginWrongNum;
    }

    public void setLoginWrongNum(Integer loginWrongNum) {
        this.loginWrongNum = loginWrongNum;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public Integer getCompanyType() {
        return companyType;
    }

    public void setCompanyType(Integer companyType) {
        this.companyType = companyType;
    }
}